package models;

import java.util.Date;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonTypeInfo;

@JsonTypeInfo(use=JsonTypeInfo.Id.MINIMAL_CLASS, include=JsonTypeInfo.As.PROPERTY)
public class UpdateHistory {
	private Date updateDate;
	private Status oldStatus;
	private Status newStatus;
	private String etr;
	private String incidentLocation;
	private String Notes;
	
	@JsonCreator
	public UpdateHistory(@JsonProperty("oldStatus") Status oldStatus, 
			             @JsonProperty("newStatus") Status newStatus) {
		this.oldStatus = oldStatus;
		this.newStatus = newStatus;
		this.updateDate = new Date();
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public Status getOldStatus() {
		return oldStatus;
	}

	public Status getNewStatus() {
		return newStatus;
	}
	
	public String getETR() {
		return etr;
	}
	
	public void setETR(String value) {
		etr = value;
	}
	
	public String getIncidentLocation() {
		return incidentLocation;
	}

	public void setIncidentLocation(String incidentLocation) {
		this.incidentLocation = incidentLocation;
	}

	public String getNotes() {
		return Notes;
	}

	public void setNotes(String notes) {
		Notes = notes;
	}
	
	public void setUpdateDate(Date dateValue) {
		updateDate = dateValue;
	}
}
